<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<div class="bjui-pageContent">
    <div class="row" id="task" style="margin: 10px 10px;">
        <div class="panel panel-default">
            <div class="panel-heading" align="center">任务基本信息</div>
            <div class="panel-body">
                <table class="table table-condensed table-hover">
                    <tbody>
                    <tr>
                        <td width="150px"><label class="control-label x180">主题：</label></td>
                        <td>${task.name}</td>
                        <td width="150px"><label class="control-label x180">任务类型：</label></td>
                        <td>${type}</td>
                    </tr>
                    <tr>
                        <td width="150px"><label class="control-label x180">任务时间：</label></td>
                        <td>${task.executeTime}</td>
                        <td width="150px"><label class="control-label x180">任务地点：</label></td>
                        <td>${task.place}</td>
                    </tr>
                    <tr>
                        <td width="150px"><label class="control-label x180">主办联系人：</label></td>
                        <td>${task.contactstor}</td>
                        <td width="150px"><label class="control-label x180">联系电话：</label></td>
                        <td>${task.phone}</td>
                    </tr>
                    <tr>
                        <td width="150px"><label class="control-label x180">负责人：</label></td>
                        <td colspan="3" style="height: auto;">
                            <div id="managerList"
                                 style="width: 650px;height:auto;padding: 3px;display:table-cell; vertical-align:middle;">
                                <c:forEach var="username" items="${managers}">
                                    ${username}&nbsp;&nbsp;&nbsp;
                                </c:forEach>
                            </div>
                        </td>
                    </tr>
                    <c:if test="${task.state==1}">
                        <tr>
                            <td width="150px"><label class="control-label x180">完成人：</label></td>
                            <td colspan="3" style="height: auto;">
                                <div style="width: 650px;height:auto;padding: 3px;display:table-cell; vertical-align:middle;">
                                    <c:forEach var="doneusername" items="${doneUsers}">
                                        ${doneusername}&nbsp;&nbsp;&nbsp;&nbsp;
                                    </c:forEach>
                                </div>
                            </td>
                        </tr>
                    </c:if>
                    <tr>
                        <td width="150px"><label class="control-label x180">任务创建人：</label></td>
                        <td>${task.creator}</td>
                        <td width="150px"><label class="control-label x180">创建时间：</label></td>
                        <td>${task.creatTime}</td>
                    </tr>
                    <tr>
                        <td width="150px"><label class="control-label x180">备注：</label></td>
                        <td colspan="3">
                            <textarea cols="60">${task.remark==""?"无":task.remark}</textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4"><label class="control-label x180">附件：</label></td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <ul id="filename" style="font-size: 16px;display:inline;">
                                <c:forEach var="file" items="${sysFiles}" varStatus="index">
                                    <li style='margin: 4px;' id='${file.no}'>
                                        <c:choose>
                                            <c:when test="${fn:endsWith(file.name,'.jpg') || fn:endsWith(file.name,'.jpeg') || fn:endsWith(file.name,'.png')}">
                                                <a class="btn btn-blue" data-icon="image" data-resizable="false"
                                                   data-maxable="false" data-id="showPic" data-toggle="dialog"
                                                   data-height="660" data-width="880"
                                                   href="filesupload/showpic/${file.no}.shtml">${file.name}</a>
                                            </c:when>
                                            <c:otherwise>
                                                <a class="btn btn-blue"
                                                   href="filesupload/download/${file.no}.shtml">${file.name}</a>
                                            </c:otherwise>
                                        </c:choose>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <a class="btn btn-green" data-icon="sign-out"
                                           href="filesupload/download/${file.no}.shtml">下载</a>
                                    </li>
                                </c:forEach>
                            </ul>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close">关闭</button>
        </li>
    </ul>
</div>
<script type="text/javascript">

</script>